<?php
    echo $this->Form->create('Expense');
    if(!empty($this->Form->value('Expense.id'))){
        echo  $this->Form->input('id');
    }

?>
    <div class="panel-body">
        <div class="row mb20">
            <div class="col-sm-6">
                    <label class="control-label text-bold">Grupo:</label>
                <div class="input-group ">
                    <?php echo $this->Form->input('expense_group_id',array("class"=>"chosen-select",'data-placeholder'=>"Escolha o grupo","label"=>false,"div"=>false,'empty'=>'')); ?>
                  <span class="input-group-btn">
                    <button type="button" class="btn btn-default" data-toggle="tooltip" title="" data-original-title="Novo Grupo"><i class="fa fa-gear"></i></button>
                  </span>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="control-label text-muted">Descrição:</label>
                    <?php echo $this->Form->input('name',array("class"=>"form-control","label"=>false,"div"=>false)); ?>
                </div>
            </div>
        </div>
    </div>
    <div class="panel-footer">
        <?php echo $this->Form->button('Confirmar',array("class"=>"btn btn-primary")) ?>
        <?php echo $this->Html->link('Cancelar',array('controller'=>$this->params['controller'],'action'=>'/'),array("class"=>"btn btn-default")) ?>
    </div>
<?php
    $this->Form->end();
    echo $this->Html->script(array('chosen.jquery.min','saFinancia'),array('inline'=>false));